<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>平台支出记录管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		function excel(){
			$('#searchForm').attr('action',"${ctx}/jiujiu/jiuDefrayLog/excel");
			$('#searchForm').submit();
		}
		function search(){
			$('#searchForm').attr('action',"${ctx}/jiujiu/jiuDefrayLog");
			$('#searchForm').submit();
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jiujiu/jiuDefrayLog/">平台支出记录列表</a></li>
		<shiro:hasPermission name="jiujiu:jiuDefrayLog:edit"><li><a href="${ctx}/jiujiu/jiuDefrayLog/form">平台支出记录添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="jiuDefrayLog" action="${ctx}/jiujiu/jiuDefrayLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>状态 ：</label>
		<form:select path="status">
			<form:option value="">全部</form:option>
            <form:option value="0">未审核</form:option>
            <form:option value="1">已到账</form:option>
            <form:option value="2">支出失败</form:option>
            <form:option value="3">已驳回</form:option>
       	</form:select>
       	
       		<label>申请时间 ：</label>
				<input id="startTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuDefrayLog.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> -至-
						
				<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuDefrayLog.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> 
		<br/><br/>					
		<label>审核时间 ：</label>
				<input id=withStartTime name="withStartTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuDefrayLog.withStartTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> -至-
						
				<input id="withEndTime" name="withEndTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="<fmt:formatDate value="${jiuDefrayLog.withEndTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> 
		<br/><br/>		
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="javascript:search()"/>
		&nbsp;<input class="btn btn-primary" type="button" value="导出" onclick="javascript:excel()"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr>
		<th>头像</th>
		<th>支出账户微信名</th>
		<th>支出账户真实名</th>
		<th>支出金额</th>
		<th>支出原由</th>
		<th>申请时间</th>
		<th>状态</th>
		<th>审核人</th>
		<th>审核备注</th>
		<th>审核时间</th>
		<shiro:hasPermission name="jiujiu:jiuDefrayLog:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="jiuDefrayLog">
			<tr>
				<td><img src="${jiuDefrayLog.tiHeadimgurl}"   style="width:40px;height:40px"  /></td>
				<td>${jiuDefrayLog.tiMemberName}</td>
				<td>${jiuDefrayLog.tiRealName}</td>
				<td>${jiuDefrayLog.money}</td>
				<td>${jiuDefrayLog.reason}</td>
				<td><fmt:formatDate value="${jiuDefrayLog.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /> </td>
				<td>
					<c:choose>
					    <c:when test="${jiuDefrayLog.status eq 0}">
							未审核
					    </c:when>
					    <c:when test="${jiuDefrayLog.status eq 1}">
							已到账
					    </c:when>
					    <c:when test="${jiuDefrayLog.status eq 2}">
							支出失败
					    </c:when>
					    <c:when test="${jiuDefrayLog.status eq 3}">
							已驳回
					    </c:when>
					    <c:otherwise>
					    </c:otherwise>
					</c:choose>
				</td>
				<td>${jiuDefrayLog.examineMemberName}</td>
				<td>${jiuDefrayLog.examineRemarks}</td>
				<td><fmt:formatDate value="${jiuDefrayLog.withdrawalsTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /></td>
				<shiro:hasPermission name="jiujiu:jiuDefrayLog:edit"><td>
    				<a class="btn btn-success" href="${ctx}/jiujiu/jiuDefrayLog/form?id=${jiuDefrayLog.id}">修改</a>
					<a class="btn btn-danger" href="${ctx}/jiujiu/jiuDefrayLog/delete?id=${jiuDefrayLog.id}" onclick="return confirmx('确认要删除该平台支出记录吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		<tr>
			<td>--</td>
			<td>--</td>
			<td>--</td>
			<td>${map.moneySum}</td>
			<td>--</td>
			<td>--</td>
			<td>--</td>
			<td>--</td>
			<td>--</td>
			<td>--</td>
		</tr>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
